import {
  http
} from '@/api/service.js'
/**
 * 分类
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const activeType = (params) => {
  return http.get('/active/type', {
    params
  })
}
/**
 * 项目列表
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const projectList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/active/projectList',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 分享激活码
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const shareCode = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/active/shareCode',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 领取激活码
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const receiveCode = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/active/receiveCode',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 检查激活码
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const checkCode = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/active/checkCode',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}